﻿using CDMS.DAL;
using CDMS.Entities;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace CDMS.BLL
{
    public class Category_BLL
    {
        Category_DAL db;
        EnumCategory enumCategory;
        string tableName;
        public Category_BLL(EnumCategory enumCategory)
        {
            db = new Category_DAL(enumCategory);
            this.enumCategory = enumCategory;
            this.tableName = enumCategory.ToString();
        }

        public DataTable GetALL()
        {
            return db.GetALL();
        }

        public DataTable GetALLActivated()
        {
            return db.GetALLActivated();
        }


        public Category GetOne(int Category_ID)
        {
            return db.GetOne(Category_ID);
        }

        public int Insert(Category entity)
        {
         
            return db.Insert(entity);
        }
        public bool Update(Category entity)
        {

            return db.Update(entity);
        }

        public bool Exists(Category entity)
        {
            return db.Exists(entity);
        }

        public bool Delete(int Category_ID)
        {
            return db.Delete(Category_ID);
        }
    }
}
